308e55ee1ea26d31a31956954ff436c064964bca
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 6"""
4  date="2023-04-25T16:31:44Z"
5  content="""
6 I dug into your code, and datalad is parsing git-annex's (and perhaps 
7 git's in some cases) stderr to find error messages like this one for files
8 that don't exist, and then it internally dummies up something as if git-annex
9 were outputting a --json-error-messages record for the file. See
10 `./datalad/support/annex_utils.py` `_get_non_existing_from_annex_output`
11
12 Ok, I can understand now how needing to do an additional form of unescaping
13 on top of that existing pain point would cause the reaction I have seen in
14 this bug report.
15
16 [[todo/api_for_telling_when_nonexistant_or_non_git_files_passed]] is a todo
17 item I opened the last time I became aware of this error message parsing ugliness.
18 (Also relevant is [this closed todo](https://git-annex.branchable.com/projects/datalad/bugs-done/copy_does_not_reflect_some_failed_copies_in_--json_output/)
19 where I discuss why --json-error-messages cannot include these errors
20 as-is.)
21
22 So the choice is between implementing 
23 [[todo/api_for_telling_when_nonexistant_or_non_git_files_passed]]
24 and changing datalad to use that. Or adding a git config
25 that avoids escaping filenames. The latter would be easy
26 to do (and easier for datalad to use), but it kicks the can down the road.
27 Datalad parsing error messages would continue to be a problem going
28 forward. (Imagine if git-annex gets localized error messages..)
29 """]]